window.onload=function () {
        function getCookie(cookieName) {
            var allcookies = document.cookie;
            var cookiePos = allcookies.indexOf(cookieName); //索引的长度
            if (cookiePos != -1) {
                // 把cookie_pos放在值的开始，只要给值加1即可。
                cookiePos += cookieName.length + 1;
                var cookieEnd = allcookies.indexOf(";", cookiePos);

                if (cookieEnd == -1) {
                    cookieEnd = allcookies.length;
                }
                var value = decodeURI(allcookies.substring(cookiePos, cookieEnd));
            }
            return value;
        }

        var name = getCookie("name");
        var phone = getCookie("phone");
        var number = getCookie("number");
        var faculty = getCookie("faculty");
        var identity = getCookie("identity");
        var school = getCookie("school");
        var energy = getCookie("energy");
        var Id=getCookie("Id");
        console.log(name);
        console.log(number);
        console.log(document.getElementById("username"));
        document.getElementById("username1").innerHTML = name;
        document.getElementById("number").innerHTML = number;
    }